package day15;

class Teemo {
	
	@Override
	protected void finalize() throws Throwable {
		 System.out.println("系统回收资源中...");
	}
}

public class Test4 {

	public static void main(String[] args) {

		for (int i = 0; i < 3; i++) {
			new Teemo();
//			System.gc();  //强制回收
			Runtime.getRuntime().gc();
		}

	}

}
